#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int m = 0;
    //scanf("%d", &m);
    while(scanf("%d", &m)!=-1)
    if (m % 5 == 0)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}